package com.slf.common.client.control;

public class WSControllerProxy implements WSController {
  private String _endpoint = null;
  private WSController wSController = null;
  
  public WSControllerProxy() {
    _initWSControllerProxy();
  }
  
  public WSControllerProxy(String endpoint) {
    _endpoint = endpoint;
    _initWSControllerProxy();
  }
  
  private void _initWSControllerProxy() {
    try {
      wSController = (new WSControllerServiceLocator()).getWSController();
      if (wSController != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)wSController)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)wSController)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (wSController != null)
      ((javax.xml.rpc.Stub)wSController)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public WSController getWSController() {
    if (wSController == null)
      _initWSControllerProxy();
    return wSController;
  }
  
  public java.lang.String execute(java.lang.String strReqXml) throws java.rmi.RemoteException{
    if (wSController == null)
      _initWSControllerProxy();
    return wSController.execute(strReqXml);
  }
  
  
}